home *** CD-ROM | disk | FTP | other *** search
/ PD Collection CD 1 / PD Collection CD 1.iso / textual / tex / files / !tex / TeXsource / commontex / h / error < prev    next >
Encoding:
Text File  |  1988-04-08  |  2.1 KB  |  101 lines

  1. /*
  2.  *    Copyright 1986, 1987 Pat Joseph Monardo. All rights reserved.
  3.  *    Copying of this file is granted according to the provisions 
  4.  *    specified in the file COPYING which must accompany this file.
  5.  */
  6.  
  7.  
  8. /*
  9.  *        error.h
  10.  */
  11.  
  12. #define    BATCH_MODE                0
  13. #define    NONSTOP_MODE            1
  14. #define    SCROLL_MODE                2
  15. #define    ERROR_STOP_MODE            3
  16.  
  17. #define    wake_up_terminal()
  18.  
  19. global    int        old_setting;
  20.  
  21. int    begin_diagnostic();
  22. int    end_diagnostic();
  23.  
  24. int    print_err();
  25.  
  26. global    int        interaction;
  27. global    bool    deletions_allowed;
  28. global    int        history;
  29. global    int        error_count;
  30.  
  31. #ifndef NOHELP 
  32. #define    help0() \
  33.     {help_ptr = 0;}
  34.  
  35. #define    help1(h0) \
  36.     {help_ptr = 1; help_line[0] = h0;}
  37.  
  38. #define    help2(h0, h1) \
  39.     {help_ptr = 2; \
  40.     help_line[0] = h0; help_line[1] = h1;}
  41.  
  42. #define    help3(h0, h1, h2) \
  43.     {help_ptr = 3; help_line[0] = h0; \
  44.     help_line[1] = h1; help_line[2] = h2;}
  45.  
  46. #define    help4(h0, h1, h2, h3) \
  47.     {help_ptr = 4; \
  48.     help_line[0] = h0; help_line[1] = h1; \
  49.     help_line[2] = h2; help_line[3] = h3;}
  50.  
  51. #define    help5(h0, h1, h2, h3, h4) \
  52.     {help_ptr = 5; help_line[0] = h0; \
  53.     help_line[1] = h1; help_line[2] = h2; \
  54.     help_line[3] = h3; help_line[4] = h4;}
  55.  
  56. #define    help6(h0, h1, h2, h3, h4, h5) \
  57.     {help_ptr = 6; \
  58.     help_line[0] = h0; help_line[1] = h1; \
  59.     help_line[2] = h2; help_line[3] = h3; \
  60.     help_line[4] = h4; help_line[5] = h5;}
  61. #else
  62. #define    help0()
  63. #define    help1(h0)
  64. #define    help2(h0, h1)
  65. #define    help3(h0, h1, h2)
  66. #define    help4(h0, h1, h2, h3)
  67. #define    help5(h0, h1, h2, h3, h4) 
  68. #define    help6(h0, h1, h2, h3, h4, h5)
  69. #endif
  70.  
  71. global    char*        help_line[];
  72. global    int            help_ptr;
  73. global    bool        use_err_help;
  74.  
  75. int    jump_out();
  76. int    error();
  77. int    int_error();
  78. int    normalize_selector();
  79.  
  80. #define    succumb() \
  81.     {if (interaction == ERROR_STOP_MODE) \
  82.         interaction = SCROLL_MODE; \
  83.     error(); history = FATAL_ERROR_STOP; jump_out();}
  84.  
  85. #define    SPOTLESS                0
  86. #define    WARNING_ISSUED            1
  87. #define    ERROR_MESSAGE_ISSUED    2
  88. #define    FATAL_ERROR_STOP        3
  89.  
  90. int    fatal_error();
  91. int    overflow();
  92. int    confusion();
  93.  
  94. global    int        interrupt;
  95. global    bool    OK_to_interrupt;
  96.  
  97. #define    check_interrupt() \
  98.     {if (interrupt != 0) pause_for_instructions();}
  99.  
  100. int    pause_for_instructions();
  101.